package com.sq.partner.manager.dao;

import java.sql.SQLException;
import java.util.List;

import com.sq.partner.manager.mybatis.model.CoreProdInst;
import com.sq.partner.manager.mybatis.model.CoreProdPlan;
import com.sq.partner.manager.mybatis.model.TradCalDef;
import com.sq.partner.manager.mybatis.model.TradInsuPlan;
import com.sq.partner.manager.mybatis.model.TradItemCal;
import com.sq.partner.manager.mybatis.model.TradProdInst;
import com.sq.partner.manager.util.Page;

public interface ITradProdInstDao extends BaseDao {

	Page<TradProdInst> queryPage(Page<TradProdInst> page)throws SQLException;

	Page<CoreProdInst> queryProdInstPage(Page<CoreProdInst> page)throws SQLException;

	void saveTradProdInst(TradProdInst tradProdInst) throws Exception;

	TradProdInst findMaxTradProdCode(TradProdInst tradProdInst) throws SQLException;

	void deleteTradProdInst(String tradProdCode) throws Exception;

	List<CoreProdPlan>  queryProdPlan(String tradProdCode) throws SQLException ;

	TradProdInst queryTradProdInstById(String tradProdCode)throws SQLException ;

	Page<CoreProdPlan> queryProdPlanPage(Page<CoreProdPlan> page,TradProdInst tradProdInst)throws SQLException ;

	List<TradCalDef> queryTradCalDef(TradCalDef trad)throws SQLException ;

	TradProdInst queryTradProdInst(TradProdInst tradProdInst)throws SQLException ;

	void deleteTradProdInst(TradProdInst tradProdInst) throws Exception;

	void updateTradProdInst(TradProdInst tradProdInst) throws Exception;

	//方案新增、复制新增页面，产品弹出框查询
	Page<TradProdInst> queryProdPageForInsure(Page<TradProdInst> page) throws SQLException;
	/**
	 * 查询险种子算法
	 * wangyan
	 * 2015年6月5日11:52:34
	 */
	List<TradItemCal> queryTradItemCal(TradItemCal trad)throws SQLException;
	
	public void updateTradProdInstIsHealthFlag(TradProdInst tradProdInst) throws Exception;

}
